<!--继电器列表-->
<ion-view title="继电器：{{deviceName}}">
    <ion-nav-bar class="bar-stable nav-title-slide-ios7  bar-positive">
        <ion-nav-back-button class="button-icon ion-nav-back-button " style="font-weight: 700;font-size: 14px;width: 70px;background-image: url('./img/back.png');background-size: 70px 32px;background-repeat:no-repeat;">
            &nbsp;&nbsp;&nbsp;返回
        </ion-nav-back-button>
    </ion-nav-bar>
    <style>
        .button1{
            min-width: 230px;
            border-color: #145fd7;
            background-color: #4a87ee;
            color: #fff;
        }
        .button1:hover {
            color: #fff;
            text-decoration: none;
        }
        .button1.activated {
            border-color: #145fd7;
            background-color: #145fd7;
            box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.15); }
    </style>
    <ion-content has-header="true"  has-bouncing="true" overflow-scroll="false" style="background-color: #E9F3FC;">
        <!--{{item.name}}-->
        <ion-list>
            <ion-item class="item" ng-repeat="relay in relayList  track by $index" type="item-text-wrap" style="background-color: #E9F3FC;"><!-- href="#/tab/relay/{{relay.raId}}"-->

                <div class="row">
                    <div class="col col-top col-10" style=" margin-top: -15px;margin-left: -15px; padding: 0px;">
                        <div>
                            <a class="button button-icon icon ion-arrow-graph-up-right" ></a>
                        </div>
                    </div>
                    <div class="col col-top">
                        <div style="margin-top: -10px;">&nbsp;&nbsp;<a href="#/tab/relay/{{relay.raId}}/{{relay.title}}" style="text-decoration: none; color: #000000; ">{{relay.title}}</a></div>
                    </div>

                    <!--<div class="col col-top" style=" margin-top: -15px;padding: 0px;">
                        <div>
                            <a class="button button-icon icon ion-merge" ></a>
                        </div>
                    </div>-->
                </div>
                <div class="row" style="height: 30px;">
                    <div class="col col-top col-10">
                        <div><label class="checkbox" style="margin-left: -10px; margin-top: -10px; padding-left: 0px;">
                            <input type="checkbox"  ng-model="relay.selected"  ng-true-value="0"
                                   ng-false-value="1" name="checkname" ng-click="fn(relay.raId)">
                        </label></div>
                    </div>
                    <div class="col col-top col-25 col-offset-0" style=" margin-top: -5px;">
                        <label class="toggle toggle-positive">
                            <input type="checkbox"  name="checkToggle" ng-model="relay.relaytate" ng-true-value="1" ng-false-value="0" ng-change="relayChangeState($index)">
                            <div class="track">
                                <div class="handle"></div>
                            </div>
                        </label>
                    </div>
                    <div class="col col-top" style=" margin-top: -7px;padding: 0px;">
                        <div>
                            <a class="button button-icon">
                                <img src="./img/timer.png" style="padding-top: 12px;vertical-align:text-bottom;">
                                <span style="font-size: 12px;">&nbsp;&nbsp;{{relay.timerset}}</span>
                            </a>
                        </div>
                    </div>
                    <div class="col col-top col-offset-66" style=" margin-top: -15px; padding: 0px;">
                        <div style="font-size: 18px;margin-left: 18px;color:#4C86B4 ">
                            <i class="icon icon-right ion-chevron-right"></i>
                        </div>
                    </div>
                </div>

            </ion-item>

            <div ng-if="isData" style="font-size: 20px;color: red;text-align: center;margin-top: 50px;">暂无数据...</div>

            <div class="row" style="margin-left: 0px;" ng-if="isRelayCheckAll.isdata==1">
                <div class="col col-10">
                    <label class="checkbox">
                        <input type="checkbox" ng-mudel="name" name="checksName" ng-click="checkAll()">
                    </label>
                </div>
                <div class="col col-33 col-center" style="font-weight: bold; margin-top: 9px;">
                    &nbsp;&nbsp;全选
                </div>
                <div class="col col-33 col-center col-offset-34" style="margin-top: 5px">&nbsp;&nbsp;
                    <label class="toggle toggle-positive">
                        <input type="checkbox" name="checkToggle" ng-model="isRelayCheckAll.ckall" ng-true-value="1" ng-false-value="0" ng-change="changeRelayStateSelect(isRelayCheckAll.ckall)">
                        <div class="track">
                            <div class="handle"></div>
                        </div>
                    </label>
                </div>
            </div>
        </ion-list>
        <!--<ion-infinite-scroll ng-if="!moreDataCanBeLoaded"  icon="ion-loading-a"  on-infinite="loadMoreData()"  distance="8%">
        </ion-infinite-scroll>-->
        <!--<p ng-if="moreDataCanBeLoaded"></p>-->
    </ion-content>
</ion-view>
